翻訳と辞書
Words near each other
・ Code page 857
・ Code page 858
・ Code page 859
・ Code page 860
・ Code page 861
・ Code page 862
・ Code amber alert
・ Code and Other Laws of Cyberspace
・ Code as data
・ Code Aster
・ Code audit
・ Code B
・ Code Black
・ Code Black (DJ)
・ Code Black (TV series)
Code bloat
・ Code Blue
・ Code Blue (album)
・ Code Blue (film)
・ Code Blue (Japanese TV series)
・ Code Blue – Emergency
・ Code Breaker
・ Code Breakers
・ Code Breakers (film)
・ Code browser
・ Code Camp
・ Code cave
・ Code cleanup
・ Code Club
・ Code Co-op


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Code bloat : ウィキペディア英語版
Code bloat

Code bloat is the production of code that is perceived as unnecessarily long, slow, or otherwise wasteful of resources. Code bloat can be caused by inadequacies in the language in which the code is written, inadequacies in the compiler used to compile the code, or by a programmer. Therefore, code bloat generally refers to source code size (as produced by the programmer), but sometimes is used to refer instead to the ''generated'' code size or even the binary file size.
==Common causes==
Often, bloated code can result from a programmer who simply uses more lines of code than the optimal solution to a problem.
Some reasons for programmer derived code bloat are:
* Overuse of object oriented (OOP) constructs – such as classes and inheritance – can lead to messy and confusing designs, often taking many more lines of code than an optimal solution.
* Incorrect usage of design patterns – OOP developers may attempt to "force" design patterns as solutions to problems that do not need them.
* Not using appropriate encapsulation of solutions to partial problems and thus allowing for their re-use, resulting in code duplication 〔http://www.stevemcconnell.com/ieeesoftware/bp16.htm〕
* Declarative programming – implementing a declarative programming style in an imperative or OOP language often leads to code bloat.
* Excessive loop unrolling – without justification through improved performance.
* Excessive use of multiple conditional If statements – instead of, for instance, using a lookup table.
Some native implementations of the template system employed in C++ are examples of inadequacies in the compiler used to compile the language.
A native compiler implementing this feature can introduce versions of a method of a template class for every type it is used with. This in turns leads to compiled methods that may never be used, thus resulting in code bloat. More sophisticated compilers and linkers detect the superfluous copies and discard them, or avoid generating them at all, reducing the bloat. Thus template code can result in smaller binaries because a compiler is allowed to discard this kind of dead code.〔(hopl-may.dvi )〕
Some examples of native compiler derived bloat include:
* Dead code – code which is executed but whose result is never used.
* Redundant calculations – re-evaluating expressions that have already been calculated once. Such redundant calculations are often generated when implementing "bounds checking" code to prevent buffer overflow. Sophisticated compilers calculate such things exactly once, eliminating the following redundant calculations, using common subexpression elimination and loop-invariant code motion.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Code bloat」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.